package com.aya.simple.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Aspect
@Service
public class FirstAnnotationAspect {
    Logger logger = LoggerFactory.getLogger(FirstAnnotationAspect.class);




    @Around("execution(* com.aya.simple..*(..))")
    public Object doAround(ProceedingJoinPoint pjp)
            throws Throwable {
        logger.info("FirstAnnotationAop:start");
        Object obj = pjp.proceed();
        logger.info("FirstAnnotationAop:end");
        return obj;
    }
}
